"""
1. pip install langchain-core
2. pip install --upgrade openai langchain langchain-openai langchain_community asyncio
3. 模版文档 https://www.langchain.com.cn/docs/concepts/#prompt-templates
"""
from langchain_core.prompts import PromptTemplate

from utils.log_utils import NJLogger

prompt_template = PromptTemplate.from_template("Tell me a joke about {topic}")
result = prompt_template.invoke({"topic": "cats"})
NJLogger.info(result)